<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./templates/defaultTemplate.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:define name="top">
        <h2> Forum HEI ITI </h2>
        <div class="absoluteTopRight">
            <c:if test="${jarjarbean.userConnected != null}">
                <h:outputLink value="#{subjectThread.baseModeratorPath}/subjects.xhtml">
                    Administration des sujets
                </h:outputLink>
            </c:if>
            <h:outputLink value="#{subjectThread.basePath}/index.xhtml">
                Accueil
            </h:outputLink>
        </div>
    </ui:define>
    <ui:define name="content">
        <f:metadata>
            <f:viewParam id="uuid" name="uuid" value="#{subjectThread.currentSubjectUuid}" required="false"/>
        </f:metadata>
        <f:event type="preRenderView" listener="#{subjectThread.initSubjectsList}" />
        <h:message for="uuid" />
        
        <div id="loginContent"><ui:include src="/log/loginContent.xhtml"/></div>
        <c:if test="${jarjarbean.userConnected == null}">
            <!--            <h:form id="inscriptionLink">
                            <h:commandLink value="S'incrire" action="goToRegister"/>
                        </h:form>-->
            <h:outputLink value="/forum-war/faces/log/register.xhtml">S'inscrire</h:outputLink>
        </c:if>
        <div class="clear"></div>
        
        <c:if test="${jarjarbean.userConnected != null}">
            Voici les différents sujets
            <ui:include src="subjects-threads.xhtml"/>
        </c:if>
    </ui:define>
</ui:composition>

